package com.example.program.Helper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyHelper extends SQLiteOpenHelper {
    private Context mCon = null;

    public MyHelper(Context context) {
        super(context, "Passdb.db", null, 1);
        this.mCon = context;
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE [Login_DB] (  [Account] NTEXT NOT NULL ON CONFLICT FAIL,   [Password] NTEXT NOT NULL ON CONFLICT FAIL);");
        db.execSQL("CREATE TABLE [PassW_DB] (  [Site] NTEXT NOT NULL ON CONFLICT FAIL,   [Account] NTEXT NOT NULL ON CONFLICT FAIL,   [Passsword] NTEXT NOT NULL ON CONFLICT FAIL,   [Des] NTEXT);");
        db.execSQL("INSERT INTO Login_DB VALUES ('Default','12345678')");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
